﻿@model PinLayoutMVC.Models.SurveyOverviewModel

@{
    ViewBag.Title = "SurveyOverview";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="headerTitle">
    <div class="pageTitle" > Survey Overview</div>

    <div class="eigenlink">
       @Html.ActionLink("Create new survey","createnewsurvey", "Admin" )
    </div>
</div>

<!DOCTYPE html>

<html>
<head>
    <title>SurveyOverview</title>
</head>
<body>
    <div class="TabelSizzle">
        <table>
            <tr>
            <td><div id="eigenTableHeader"> Name  </div></td>
            <td><div id="eigenTableHeader2"> Description  </div></td>
            <td><div id="eigenTableHeader4"> Published&nbsp&nbsp&nbsp&nbsp  </div></td>
            <td><div id="eigenTableHeader3"> Creation Date </div></td>
            <td></td>
            </tr>          

                @foreach (var survey in Model.Surveys) 
                {
                <tr>
                    <td>
                        @survey.Name
                        &nbsp&nbsp&nbsp&nbsp
                    </td>
                    <td>
                        @survey.Description
                        &nbsp&nbsp&nbsp&nbsp
                    </td>
                   <td>
                        @survey.Published
                        &nbsp&nbsp&nbsp&nbsp
                    </td>
                    <td>
                        @survey.CreationDate.ToString().Substring(0, 10)
                        &nbsp&nbsp&nbsp&nbsp
                    </td>
                    <td>
                        @Html.ActionLink("Details", "SurveyDetails", "Admin", new { survey.ID }, null)
                    </td>
                    <td>
                        @Html.ActionLink("Take Survey", "TakeSurvey", "Survey", new { survey.ID }, null)
                    </td>
                </tr>
                }

        </table>
        </div>

</body>
</html>
